package com.sunfield.windpower.activity;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.sunfield.baseframe.base.BaseActivity;
import com.sunfield.windpower.R;
import com.sunfield.windpower.adapter.QuickEnterAdapter;
import com.sunfield.windpower.bean.QuickEnterInfo;
import com.sunfield.windpower.decoration.ApproveOnlineDecoration;
import com.sunfield.windpower.decoration.QuickEnterSpaceDecoration;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.ViewById;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by wxl on 2017/2/8.
 */
@EActivity(R.layout.activity_approve_online)
public class ApproveOnlineActivity extends BaseActivity {
    @ViewById
    RecyclerView rv_list;

    @Bean
    QuickEnterAdapter adapter;

    @AfterViews
    void init() {
        rv_list.setLayoutManager(new LinearLayoutManager(this));
        rv_list.addItemDecoration(new ApproveOnlineDecoration(adapter));
        rv_list.addItemDecoration(new QuickEnterSpaceDecoration());

        rv_list.setAdapter(adapter);

        List<QuickEnterInfo> contactList = new ArrayList<>();
        contactList.add(new QuickEnterInfo("发起新流程", R.drawable.quick_icon5));
        contactList.add(new QuickEnterInfo("已发起流程", R.drawable.quick_icon6));
        contactList.add(new QuickEnterInfo("流程委托", R.drawable.quick_icon7));
        contactList.add(new QuickEnterInfo("流程搜索", R.drawable.quick_icon8));
        adapter.setContactList(contactList);

        List<QuickEnterInfo> functionList = new ArrayList<>();
        functionList.add(new QuickEnterInfo("待办任务", R.drawable.quick_icon9));
        functionList.add(new QuickEnterInfo("已办任务", R.drawable.quick_icon10));
        functionList.add(new QuickEnterInfo("未完成任务", R.drawable.quick_icon11));
        adapter.setFunctionList(functionList);
    }
}
